home *** CD-ROM | disk | FTP | other *** search
/ PC Media 22 / PC MEDIA CD22.iso / share / udos / disp186a / doc / display.faq < prev    next >
Text File  |  1994-09-23  |  15KB  |  355 lines

  1. --------------------------------------------------------------------------------
  2.                PART I -- TIPS FOR DIFFERENT OPERATING SYSTEMS
  3. --------------------------------------------------------------------------------
  4.  
  5. (1). WINDOWS (from Oliver Weyand)
  6.     Start Display under WINDOWS through a PIF file. Give display all
  7.     memory you have (parameters -1 for ems and/or xms in pif-editor),
  8.     because you will have no swap-space in a windows-shell (that's
  9.     ok, because windows will manage the virtual memory). Make sure
  10.     NOT to use a graphic driver in protected mode (windows will show
  11.     you one of this boring error messages), so don't add the 'driver ::p'
  12.     statement to your go32 environment.
  13.     With DISPLAY 1.82 or latter, you are not forced to use VESA driver.
  14.  
  15. (2). OS/2 (from Oliver Weyand, chbrin3@nyx.uni-konstanz.de)
  16.     Load a vesa-driver in your autoexec.bat (under OS/2 this file is only
  17.     executed when you open a DOS shell). Don't use 'driver ::p'. Give it
  18.     enough memory: the standard 4MB dpmi-memory are not enough. Open the
  19.     menu for the DOS shell and edit the entries for memory (EMS,XMS,DPMI).
  20.     Also edit the entries for graphic capabilities. If you won't use the
  21.     autoexec.bat file for display's DOS session, enter the name of the used
  22.     batch file. If you don't understand this things refer to your OS/2
  23.     manual. For further hints how to setting up DOS shells under OS/2 refer
  24.     to the hints that can be found on many ftp servers (if you are an OS/2
  25.     user you will know them, i.e. hobbes).
  26.     It was reported to me, that display won't run under OS/2 at all. Sorry
  27.     guys, can't help you. I just tell you what has worked for me with version
  28.     2.1 on my 486/33. BTW, if you search a good viewer-converter for OS/2
  29.     give Joe-View a chance (joevw128 or higher, shareware).
  30.  
  31. (3). Novell DOS 7 (from Oliver Weyand, chbrin3@nyx.uni-konstanz.de)
  32.     When running display under NWDOS 7 there is only one thing that is
  33.     different from MSDOS: the multitasking environment. You have to make
  34.     sure, that display can't use dpmi. So you can either type 'dpmi off'
  35.     at the NWDOS prompt or add the nodpmi statement to the go32 variable
  36.     (set go32=nodpmi ...) in the runme.bat. Because the NWDOS multitasker
  37.     supports only standart VGA mode you should use display not in graphics-
  38.     text mode (if you do display will switch to plain text after an error
  39.     message). Further the only available graphics mode is 320x200-8bit.
  40.     You can convert files or generate movies in the backround, while you
  41.     play a your favourite game (beware, that you need at least a 486 with
  42.     at least 8-16MB RAM). Because I use NWDOS on a stand-alone machine I
  43.     can't say anything about using display with Netware-Lite.
  44.  
  45. (4). LINUX
  46.     If someone knows anything about the dos-shell of linux please fill in
  47.     here. Because there are other good graphic programs running under X11
  48.     I'm not sure if there is need to run display under linux. But anyway, if
  49.     someone has done it please write, post, e-mail.
  50.  
  51. --------------------------------------------------------------------------------
  52.                             PART II -- OTHER FAQS
  53. --------------------------------------------------------------------------------
  54.  
  55. Q1: How can I convert group of 24-bit images to 8-bit images with the same
  56.     palette table ?
  57. A: Use the following steps:
  58.    1. Find a palette table:
  59.         Tag the images you want. Select 'accumulation quantization' to
  60.         produce a palette table.
  61.         - or -
  62.         press F5, then 'load a palette table'.
  63.    2. press F4, then change 'number of colors option' to 'no effect'.
  64.    3. press F5, then select 'push palette table'.
  65.    4. Tag the image you want. Select 'batch conversion' with two special
  66.       effects:
  67.       (1) 'pop palette table'
  68.       (2) 'color quantization' with 'current palette' option.
  69.  
  70.  
  71. Q2: How can I view the original palette table of an image ?
  72. A: press F4, then change 'number of colors option' to 'no effect'.
  73.  
  74.  
  75. Q3: How can I resize image using percentage ?
  76. A: Just add '%' to end of number, like '120%'.
  77.  
  78.  
  79. Q4: Why does this program show the message, 'CPU must be in real mode' ?
  80. A: It is likely that you have 'device=emm386.exe noems' in config.sys.
  81.    Remove 'noems'.
  82.  
  83. Q5: What is 'response file' ?
  84. A: Response file is used to overcome the 128-byte limit in command line
  85.    length. You can put anything in response file just as in command line.
  86.    For example, you can put the following lines in IMAGE.LST :
  87.  
  88. aaa.gif
  89. bbb.jpg
  90. ccc.bmp
  91.  
  92.    then use 'DISPLAY --slide @IMAGE.LST' to do slide show.
  93.  
  94. Q6: What is 'description file' ?
  95. A: Desciprtion file is a file containing the description for each image
  96.    in current directory. It can help you remember what is in each image.
  97.    You can change the file name to whatever you want (Please read the
  98.    TEXT section in config.dis).
  99.    The standard file name for 4DOS (another command processor for MS-DOS
  100.    which can replace COMMAND.COM) is descript.ion. If you want to manipulate
  101.    description file yourself, I suggest that you get 4UTILS??.ZIP from
  102.    simtel20 mirror sites.
  103.    Please see PART III for the format. The format used in 4DOS is more
  104.    complicated than that listed here.
  105.  
  106. Q7: What files are needed for minimal usage ?
  107. A: The minimal set of needed files is :
  108.    GO32.EXE, DISPLAY.EXE, RUNME.BAT, one Video Driver, CONFIG.DIS,
  109.    EMU387(if you don't have x87), Fonts(if you want contact sheet).
  110.    Any thing else can be deleted.
  111.  
  112. Q8: Why don't movie and mouse work in Windows or OS/2 environment ?
  113. A: Because of the timer problem, movies are not supported in these environments.
  114.    Mouse in these environments is not stable yet, so I disable it in the
  115.    official release.
  116.  
  117. Q9: What is 'processing target' ?
  118. A: DISPLAY can store both 8-bit and 24-bit images in memory. You must select
  119.    one from the two. If 'img8' is highlighted, all operations are performed
  120.    upon 8-bit image. Otherwise 24-bit image is used.
  121.  
  122. Q10: What is 'linking' ?
  123. A: For people who have 8-bit(256 colors) video card only, there is no
  124.    possibility to view true-color image. Because 24-bit image is quantized
  125.    to 8-bit before viewing. Can I crop true-color image manually in graphic
  126.    mode ? Yes, by setting resource 'auto_link_24_to_8' when you crop 8-bit
  127.    image, 24-bit image is cropped, too. 'linking' works for cropping only.
  128.  
  129. Q11: How can I make a new video driver ?
  130. A: Look at the DRVSRC directory. Find a source file that is close to your
  131.    video card. Use text editor to edit the source file. Follow the commands
  132.    in makefile to make a new video driver.
  133.    All video drivers are borrowed from DJGPP and GRX.
  134.    You can get the whole DJGPP and GRX package from :
  135.      omnigate.clarkson.edu: /pub/msdos/djgpp
  136.      or simtel20 mirros sites.
  137.    You must understand assembly language. I suggest that you use et4000.asm
  138.    as a template.
  139.  
  140. Q12: How can I increase the JPEG decompression speed ?
  141. A: set jpeg_fast_decode to 1. If you have only 8-bit(256 colors) display card,
  142.    you should tune two additional parameters: jpeg_quantization & 
  143.    jpeg_color_dither. For the fastest speed, set jpeg_quantization to 'Grey256'
  144.    or '1 Pass' and jpeg_color_dither to 'Ordered'.
  145.    Please read the PROCESS_CONTROL section in config.dis.
  146.  
  147. Q13: What do the JPEG-related parameters mean ?
  148. A: For the Decompression parameters, please read the PROCESS_CONTROL section
  149.    in config.dis.
  150.    For Compression parameters : (Borrowed from IJG document)
  151.      Quality :
  152.        The quality switch lets you trade off compressed file size against
  153.        quality of the reconstructed image: the higher the quality setting,
  154.        the larger the JPEG file, and the closer the output image will be to
  155.        the original input.  Normally you want to use the lowest quality
  156.        setting (smallest file) that decompresses into something visually
  157.        indistinguishable from the original image.  For this purpose the
  158.        quality setting should be between 50 and 95; the default of 75 is
  159.        often about right.  If you see defects at -quality 75, then go up 5 or
  160.        10 counts at a time until you are happy with the output image.  (The
  161.        optimal setting will vary from one image to another.)
  162.  
  163.        quality 100 will generate a quantization table of all 1's,
  164.        eliminating loss in the quantization step (but there is still
  165.        information loss in subsampling, as well as roundoff error).  This
  166.        setting is mainly of interest for experimental purposes.    Quality
  167.        values above about 95 are not recommended for normal use; the
  168.        compressed file size goes up dramatically for hardly any gain in
  169.        output image quality.
  170.  
  171.      Optimize:
  172.        Perform optimization of entropy encoding parameters.  Without
  173.        this, default encoding parameters are used. optimize usually
  174.        makes the JPEG file a little smaller, but DISPLAY runs somewhat
  175.        slower and needs much more memory.  Image quality and speed of
  176.        decompression are unaffected by optimize.
  177.  
  178.      Smooth N:
  179.        Smooth the input image to eliminate dithering noise. N ranging
  180.        from 1 to 100, indicates the strength of smoothing. 0 (the
  181.        default) means no smoothing.
  182.        The smooth option filters the input to eliminate fine-scale noise.
  183.        This is often useful when converting GIF files to JPEG: a moderate
  184.        smoothing factor of 10 to 50 gets rid of dithering patterns in the
  185.        input file, resulting in a smaller JPEG file and a better-looking
  186.        image.  Too large a smoothing factor will visibly blur the image,
  187.        however.
  188.  
  189.      Restart marker N:
  190.        Emit a JPEG restart marker every N MCU rows, restart 0 (the
  191.        default) means no restart markers.
  192.        The restart option inserts extra markers that allow a JPEG decoder to
  193.        resynchronize after a transmission error.  Without restart markers,
  194.        any damage to a compressed file will usually ruin the image from the
  195.        point of the error to the end of the image; with restart markers, the
  196.        damage is usually confined to the portion of the image up to the next
  197.        restart marker.  Of course, the restart markers occupy extra space.
  198.        We recommend restart 1 for images that will be transmitted across
  199.        unreliable networks such as Usenet.
  200.  
  201.      Sample HxV:
  202.        Set JPEG sampling factors.  If you specify fewer H/V pairs than
  203.        there are components, the remaining components are set to 1x1
  204.        sampling.  The default setting is equivalent to sample 2x2.
  205.        This "wizard" switch is intended for experimentation with JPEG.  If
  206.        you don't know what you are doing, don't use them.
  207.  
  208.      Fast JPEG encode:
  209.        Use fast integer DCT (less accurate).
  210.  
  211. Q14: Can I play movie under Windows or OS/2 ?
  212. A: Yes. But the timing is not very accurate. If you use third-party products,
  213.    playing movie may not work.
  214.  
  215. Q15: Should I enable 'skip B frame' in MPEG ?
  216. A: If you want to increase frame rate, enable this option. It increases the
  217.    playing speed, but you will see the discontinuity in playing. 
  218.    Don't enable this option when saving each frame.
  219.  
  220.  
  221. --------------------------------------------------------------------------------
  222.                          PART III -- SOME FILE FORMATS
  223. --------------------------------------------------------------------------------
  224.  
  225. Palette File Format
  226. -------------------
  227.  
  228.   offset  length  content
  229.  
  230.   0       8       "DISPpal0"
  231.   8       4       number of colors(Intel byte order).
  232.   12      4       R,G,B,A for each color.
  233.   ...     ...     ......
  234.  
  235.  
  236.  
  237. YUV Format (from Berkeley MPEG ENCODER package)
  238. ----------
  239.  
  240. The U and V components are subsampled 4:1.
  241.  
  242. To give you an idea of what format the YUV file must be in, the following
  243. code will read in a YUV file:
  244.  
  245.     unsigned char **y_data, **cr_data, **cb_data;
  246.  
  247.     void          ReadYUV(char *fileName, int width, int height)
  248.     {
  249.     FILE *fpointer;
  250.     register int y;
  251.  
  252.     /* should allocate memory for y_data, cr_data, cb_data here */
  253.  
  254.     fpointer = fopen(fileName, "r");
  255.  
  256.     for (y = 0; y < height; y++)            /* Y */
  257.         fread(y_data[y], 1, width, fpointer);
  258.  
  259.     for (y = 0; y < height / 2; y++)            /* U */
  260.         fread(cb_data[y], 1, width / 2, fpointer);
  261.  
  262.      for (y = 0; y < height / 2; y++)            /* V */
  263.          fread(cr_data[y], 1, width / 2, fpointer);
  264.  
  265.     fclose(fpointer);
  266.     }
  267.  
  268.  
  269.  
  270. Raw RGB Format
  271. --------------
  272.  
  273.   for (y = 0; y < height; ++y)
  274.     for (x = 0; x < width; ++x) {
  275.       read RED;        /* 1 byte */
  276.       read GREEN;    /* 1 byte */
  277.       read BLUE;    /* 1 byte */
  278.     }
  279.  
  280.  
  281.  
  282. Raw GREY Format
  283. ---------------
  284.  
  285.   for (y = 0; y < height; ++y)
  286.     for (x = 0; x < width; ++x)
  287.       read GREY;        /* 1 byte */
  288.  
  289.  
  290.  
  291. Contact Sheet Script File Format
  292. --------------------------------
  293.  
  294.   1. Lines start with # are comment lines.
  295.   2. You must add this string to start of the file : "contact_sheet". This
  296.      string is an ID of script file.
  297.   3. You can write up to 2 strings for each image file in script file.
  298.      Each string can be up to 49 characters.
  299.      Strings are separated with the character '|'.
  300.  
  301.      For example : I am 1| You are 2
  302.   4. If possible DISPLAY writes the two strings in the same line.
  303.      For example:  I am 1 You are 2
  304.                          ^ Strings are separated with one SPACE character.
  305.  
  306.      If the total length of two strings is too long, DISPLAY writes the two
  307.      strings in two lines.
  308.      For example:    I am 1
  309.                     You are 2
  310.  
  311.   5. If image file name contains path(e.g. c:/qqq/n.gif or ../n.gif), it is
  312.      used as is. Otherwise(no path) current directory is assumed.
  313.  
  314.   6. The following is a sample script file:
  315.  
  316. --------Start--------
  317.  
  318. # This is a sample file
  319.  
  320. contact_sheet
  321.  
  322. ../KIKI-TON.GIF      Kiki's| gif file
  323. c:N.GIF             Nausicaa| gif file
  324. NAUSICAA.GIF    Another Nausicaa
  325. PORCO.GIF       Porco Rosso
  326. d:/tmp/image/TOTOROS.GIF     Totoros| gif
  327. WOTW1.GIF       |line 2 only
  328.  
  329. --------Stop--------
  330.  
  331.  
  332. Description File Format
  333. -----------------------
  334.  
  335. Format:
  336.  
  337. <filename.ext> <Any string up to 149 characters>
  338.  
  339. For example:
  340.  
  341. aaa.gif  this is aaa.gif
  342. bbb.jpg   I am bbb :-)
  343. cat.bmp Oh! There is a cat in this image.
  344.  
  345.  
  346. Batch Contact Sheet Script File Format
  347. --------------------------------------
  348.  
  349.   1. Lines start with # are comment lines.
  350.   2. You must add this string to start of the file : "batch_contact_sheet".
  351.      This string is an ID of script file.
  352.   3. This file is for command-line use only.
  353.   4. The format of user input string is in 'Contact Sheet Script File Format'.
  354.   5. SHEET.TPL is a documentation file. Read it.
  355.